<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2021/11/21
 * Time: 23:38
 */
namespace phpfuntions\mp_others;
class myphp_others
{

    /**
     * connection_aborted 函数：判断客户端的连接状态　
     * @access public
     * @return
     */
    public static function connection_aborted () {
        return connection_aborted( );

    }

    /**
     * connection_status 函数：返回客户端的连接状态
     * @access public
     * @return
     */
    public static function connection_status () {
        return connection_status( );

    }


    /**
     * constant 函数：返回常量的值　
     * @access public
     * @return
     */
    public static function constant ($name) {
        return constant( $name);

    }

    /**
     * define 函数：定义一个常量的值　
     * @access public
     * @return
     */
    public static function define ($name, $value, $case_insensitive = false) {
        return define($name, $value, $case_insensitive  );

    }

    /**
     * defined 函数：判断一个常量是否存在
     * @access public
     * @return
     */
    public static function defined ($name) {
        return defined( $name);

    }

    /**
     * die 函数：退出程序
     * @access public
     * @return
     */
    public static function die ($status = "") {
        return die( $status );

    }

    /**
     * eval 函数：将一个字符串作为PHP代码来执行
     * @access public
     * @return
     */
    public static function eval ($code) {
        return eval($code );

    }

    /**
     * exit 函数：退出并输出信息　
     * @access public
     * @return
     */
    public static function exit ($status = "") {
        return exit( $status);

    }

    /**
     * get_browser 函数：获取客户端浏览器的各项功能
     * @access public
     * @return
     */
    public static function get_browser ($user_agent = null, $return_array = null) {
        return get_browser($user_agent , $return_array  );

    }

    /**
     * highlight_file 函数：对一个文件进行高亮度显示
     * @access public
     * @return
     */
    public static function highlight_file ($filename, $return = null) {
        return highlight_file( $filename, $return );

    }

    /**
     * highlight_string 函数：对一个字符串进行高亮度显示
     * @access public
     * @return
     */
    public static function highlight_string ($str, $return = null) {
        return highlight_string( $str, $return );

    }

    /**
     * ignore_user_abort 函数：设定是否在客户端断开连接时，结束PHP代码的运行
     * @access public
     * @return
     */
    public static function ignore_user_abort ($value = null) {
        return ignore_user_abort($value  );

    }

    /**
     * pack 函数：将指定数据打包为二进制字符串　
     * @access public
     * @return
     */
    public static function pack ($format, $args = null, $_ = null) {
        return pack( $format, $args , $_ );

    }

    /**
     * php_strip_whitespace 函数：去除PHP文件中的注释和空格
     * @access public
     * @return
     */
    public static function php_strip_whitespace ($filename) {
        return php_strip_whitespace( $filename);

    }

    /**
     * show_source 函数：对一个文件进行高亮度显示　
     * @access public
     * @return
     */
    public static function show_source ($file_name, $return) {
        return show_source($file_name, $return );

    }

    /**
     * sleep 函数：暂停执行程序
     * @access public
     * @return
     */
    public static function sleep ($seconds) {
        return sleep( $seconds);

    }

    /**
     * time_nanosleep 函数：暂停执行程序
     * @access public
     * @return
     */
    public static function time_nanosleep ($seconds, $nanoseconds) {
        return time_nanosleep( $seconds, $nanoseconds);

    }

    /**
     * time_sleep_until 函数：在指定时间唤醒程序
     * @access public
     * @return
     */
    public static function time_sleep_until ($timestamp) {
        return time_sleep_until( $timestamp);

    }

    /**
     * uniqid 函数：生成一个单独的ID　
     * @access public
     * @return
     */
    public static function uniqid ($prefix = "", $more_entropy = false) {
        return uniqid($prefix, $more_entropy );

    }

    /**
     * unpack 函数：从二进制字符串中解包出数据到数组
     * @access public
     * @return
     */
    public static function unpack ($format, $data, $offset) {
        return unpack( $format, $data, $offset);

    }

    /**
     * usleep 函数：以微秒级暂停程序　
     * @access public
     * @return
     */
    public static function usleep ($micro_seconds) {
        return usleep($micro_seconds );

    }
}